﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FjordagerGymnastikHvorBorMedlemmerne
{
    class Program
    {
        static void Main(string[] args)
        {
            
            // args[0] should be the path to the input file
            if (args.Length < 1 || System.IO.File.Exists(args[0]) == false)
            {
                throw new Exception("args[0] must be the path to a file");
            }

            // args[1] should be the path to the output file (KML)
            if (args.Length < 2 || System.IO.File.Exists(args[1]) == false)
            {
                throw new Exception("args[1] must be the path to the output file");
            }

            // load csv file
            // for each adress convert it to coordinates
            ConvertAdressToCoordinate converter = new ConvertAdressToCoordinate();
            List<string> errors;
            converter.GenerateKML(null, args[0], out errors);
            
            converter.SaveKML(args[1]);
            // display it on google maps

        }

       
    }
}
